<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<form id="pagerForm" method="get" action="<c:url value="/orders/listProduct.do"/>">
	<input type="hidden" name="pageNum" value="1"/> 
	<input type="hidden" name="numPerPage" value="${pager.numPerPage}" />
</form>
<div class="pageHeader">
	<form rel="pagerForm" method="post" action="<c:url value="/orders/listProduct.do"/>" onsubmit="return dwzSearch(this, 'dialog');">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>产品型号:</label>
				<input class="textInput" name="product.name" value="" type="text">
			</li>	  
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">

	<table class="table" layoutH="118" targetType="dialog" width="100%">
		<thead>
			<tr>
				<th width="8%">图示</th>
				<th width="25%">名称及型号</th>
				<th width="10%">长度</th>
				<th width="10%">宽度</th>
				<th width="10%">厚度</th>
				<th width="8%">颜色图示</th>
				<th width="20%">颜色描述</th>
				<th width="9%">查找带回</th>
			</tr>
		</thead>
		<tbody>
			 <%-- <tr target="sid" rel="1">
				<td>
					<img alt="" src="<c:url value="/0360060151.jpg"></c:url>" style="height:50px;width: 30px;">
				</td>
				<td>实木门</td>
				<td>1</td>
				<td>1</td>
				<td>1</td>
				<td>
					<img alt="" src="<c:url value="/0360060151.jpg"></c:url>" style="height:50px;width: 30px;">
				</td>
				<td>棕色</td>
				<td>
					<a class="btnSelect" href="javascript:$.bringBack({id:'id',imagePath:'<c:url value="/0360060151.jpg"/>',name:'name',width:'width',height:'height',length:'length',colorId:'colorId',colorImgPath:'<c:url value="/0360060151.jpg"/>',colorDesc:'colorDesc'})" title="查找带回">选择</a>
				</td>
			</tr> --%>
			<c:forEach items="${products}" var="product">
				<tr target="sid" rel="1">
					<td>
						<img alt="" src="<c:url value="${product.imagePath}"></c:url>" style="height:50px;width: 30px;">
					</td>
					<td><c:out value="${product.name}"/></td>
					<td><c:out value="${product.width}"/></td>
					<td><c:out value="${product.height}"/></td>
					<td><c:out value="${product.length}"/></td>
					<td>
						<img alt="" src="<c:url value="${product.color.imagePath}"></c:url>" style="height:50px;width: 30px;">
					</td>
					<td><c:out value="${product.color.description}"/></td>
					<td>
						<a class="btnSelect" href="javascript:$.bringBack({id:'${product.id}',imagePath:'<c:url value="${product.imagePath}"/>',name:'${product.name}',width:'${product.width}',height:'${product.height}',length:'${product.length}',colorId:'${product.color.id}',colorImgPath:'<c:url value="${product.color.imagePath}"/>',colorDesc:'${product.color.description}'})" title="查找带回">选择</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span> 
			<select class="combox" name="numPerPage" onchange="dialogPageBreak({numPerPage:this.value})">
				<option value="20" <c:if test="${pager.numPerPage == 20}">selected="selected"</c:if>>20</option>
				<option value="50" <c:if test="${pager.numPerPage == 50}">selected="selected"</c:if>>50</option>
				<option value="100" <c:if test="${pager.numPerPage == 100}">selected="selected"</c:if>>100</option>
				<option value="200" <c:if test="${pager.numPerPage == 200}">selected="selected"</c:if>>200</option>
			</select> 
			<span>条，共${pager.totalCount}条</span>
		</div>
		<div class="pagination" targetType="dialog" totalCount="${pager.totalCount}" numPerPage="${pager.numPerPage}" pageNumShown="10" currentPage="${pager.currentPage}"></div>
	</div>
</div>